﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class Controls_ControlDangNhap : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!Page.IsPostBack)
        {
            if (Session["KhachHangVip"] != null)
            {
                lblnguoidung.Text = Convert.ToString(Session["KhachHangVip"]);
                lblChao.Text = "Chào: ";
                HyperLink3.Visible = false;
                HyperLink4.Visible = false;
            }

            else
            {
                HyperLink3.Visible = true;
                HyperLink4.Visible = true;
                lkChangePass.Visible = false;
                //lblgach.Text = "|";
            }
        }
    }

    protected void lkChangePass_Click(object sender, EventArgs e)
    {
        Session.Clear();
        FormsAuthentication.SignOut();
        Response.Redirect("~/");
    }
}